#SUBDIRS = trunk trunk2
exclude_dirs := include bin lib
dirs := $(shell find . -maxdepth 1 -type d)
dirs := $(basename $(patsubst ./%,%,$(dirs)))
dirs := $(filter-out $(exclude_dirs),$(dirs))

SUBDIRS := $(dirs)

RETLDIRS = $(SUBDIRS:%=ret-%)
	
.PHONY: subdirs $(RETLDIRS) $(SUBDIRS)
.PHONY: ret

all: $(RETLDIRS)
$(RETLDIRS): 
	$(MAKE) -C $(@:ret-%=%) 

install:$(RETLDIRS)
	$(MAKE) -C $(@:ret-%=%) install
	
clean:$(RETLDIRS)
	$(MAKE) -C $(@:ret-%=%) clean
